 <!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=divice-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no"/>
    <!-- 加上以下语句可使网页在苹果设备上运行更好 -->
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <title><%if(type==1){%><%-article.title%><%}else{%><%-works.title%><%}%></title>
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/style.css">
</head>
<body>
<div class="work-content">
    <div class="head-wrap">
        <div class="show-table">
            <div class="show-row">
                <div class="show-cell">
                    <img src="http://120.76.77.123:8080/images/data/upload/<%=member.headImgUrl%>" class="head-img">
                    <span class="name"><%=member.username%></span>
                </div>
            </div>
        </div>

    </div>
    <div class="img-wrap">
        <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
            <div class="carousel-inner" role="listbox">
                <%if(type==1){%>
                    <%for(k in res){%>
                        <div class="item <%if(k==0){%>active<%}%>">
                            <img src="http://120.76.77.123:8080/images/data/upload/<%=res[k].imgUrl%>" class="img-item" >
                        </div>
                    <%}%>

                <%}else{%>
                    <div class="item active">
                        <img src="http://120.76.77.123:8080/images/data/upload/<%-works.bak4%>" class="img-item" >
                    </div>
                <%}%>
            </div>
        </div>
    </div>
    <div class="desc-wrap">
        <p><%if(type==1){%><%-article.content%><%}else{%><%-works.content%><%}%></p>
    </div>
</div>



<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
<script>
    var iosUrl = "<%=qrcode.iosUrl%>";
    var andUrl = "<%=qrcode.andUrl%>"
    $('.share-wrap').on('click', function () {
        if(isWeiXin()){
            alert('请在浏览器中打开');
            return;
        }

        var u = navigator.userAgent;
        if (u.indexOf('Android') > -1 || u.indexOf('Linux') > -1) {//安卓手机
            //window.open(andUrl);
            location.href = andUrl;
        } else if (u.indexOf('iPhone') > -1) {//苹果手机
           // window.open(iosUrl);
            location.href = iosUrl;
        }
    })

    function isWeiXin(){
        var ua = window.navigator.userAgent.toLowerCase();
        console.log(ua)
        if(ua.match(/MicroMessenger/i) == 'micromessenger'){
            return true;
        }else{
            return false;
        }
    }
    $(window).load(function () {
        var htmlStr= '<div class="share-wrap"><img src="../images/share-btn.png"></div>'
        $('body').append(htmlStr)
    })

</script>
</body>
</html>